const MockData = {
    // 用户相关模拟数据
    user: {
      // 管理员用户
      admin: {
        id: 1,
        account: 'admin',
        name: '系统管理员',
        role: 'admin',
        department: '信息化管理中心',
        phone: '13800138000',
        email: 'admin@example.com',
        avatar: '/images/default_avatar.png',
        status: '正常'
      },
      // 教师用户
      teacher: {
        id: 2,
        account: 'teacher1',
        name: '张教授',
        role: 'teacher',
        department: '信息化管理中心',
        phone: '13800138001',
        email: 'teacher@example.com',
        avatar: '/images/default_avatar.png',
        status: '正常'
      },
      // 学生用户
      student: {
        id: 3,
        account: 'student1',
        name: '李同学',
        role: 'student',
        department: '信息化管理中心',
        className: '信管2301班',
        studentId: '2023001',
        phone: '13800138002',
        email: 'student@example.com',
        avatar: '/images/default_avatar.png',
        status: '正常'
      }
    },
  
    // 考勤相关模拟数据
    attendance: {
      // 今日考勤状态
      today: {
        hasCheckedIn: true,
        hasCheckedOut: false,
        checkinTime: '08:30',
        checkoutTime: '',
        status: '正常'
      },
      // 考勤记录列表
      list: [
        {
          id: 1,
          date: '2025-06-01',
          checkinTime: '08:30',
          checkoutTime: '17:30',
          status: '正常',
          address: '信息化管理中心'
        },
        {
          id: 2,
          date: '2025-06-02',
          checkinTime: '09:05',
          checkoutTime: '17:30',
          status: '迟到',
          address: '信息化管理中心'
        },
        {
          id: 3,
          date: '2025-06-03',
          checkinTime: '08:45',
          checkoutTime: '16:30',
          status: '早退',
          address: '信息化管理中心'
        }
      ],
      // 考勤统计
      stats: {
        total: 22,
        normal: 18,
        late: 2,
        early: 1,
        absent: 1
      },
      // 管理员查看的考勤记录
      adminList: [
        {
          id: 1,
          studentName: '李同学',
          studentId: '2023001',
          className: '信管2301班',
          date: '2025-06-01',
          checkinTime: '08:30',
          checkoutTime: '17:30',
          status: '正常'
        },
        {
          id: 2,
          studentName: '王同学',
          studentId: '2023002',
          className: '信管2301班',
          date: '2025-06-01',
          checkinTime: '09:05',
          checkoutTime: '17:30',
          status: '迟到'
        },
        {
          id: 3,
          studentName: '赵同学',
          studentId: '2023003',
          className: '信管2301班',
          date: '2025-06-01',
          checkinTime: '08:45',
          checkoutTime: '16:30',
          status: '早退'
        }
      ]
    },
  
    // 请假相关模拟数据
    leave: {
      // 请假记录列表
      list: [
        {
          id: 1,
          type: '事假',
          reason: '参加培训',
          startDate: '2025-06-10',
          endDate: '2025-06-12',
          status: '已批准',
          approver: '张主任',
          approveTime: '2025-06-08 14:30'
        },
        {
          id: 2,
          type: '病假',
          reason: '感冒发烧',
          startDate: '2025-05-20',
          endDate: '2025-05-22',
          status: '已批准',
          approver: '张主任',
          approveTime: '2025-05-19 10:15'
        }
      ],
      // 待审批请假列表
      pendingList: [
        {
          id: 3,
          studentName: '王同学',
          studentId: '2023002',
          className: '信管2301班',
          type: '事假',
          reason: '参加比赛',
          startDate: '2025-06-15',
          endDate: '2025-06-17',
          status: '待审批',
          submitTime: '2025-06-13 09:30'
        },
        {
          id: 4,
          studentName: '赵同学',
          studentId: '2023003',
          className: '信管2301班',
          type: '病假',
          reason: '肠胃炎',
          startDate: '2025-06-14',
          endDate: '2025-06-16',
          status: '待审批',
          submitTime: '2025-06-13 11:20'
        }
      ],
      // 请假统计
      stats: {
        total: 5,
        approved: 2,
        pending: 2,
        rejected: 1
      },
      // 管理员查看的请假记录
      adminList: [
        {
          id: 1,
          studentName: '李同学',
          studentId: '2023001',
          className: '信管2301班',
          type: '事假',
          reason: '参加培训',
          startDate: '2025-06-10',
          endDate: '2025-06-12',
          status: '已批准',
          approver: '张主任',
          approveTime: '2025-06-08 14:30'
        },
        {
          id: 2,
          studentName: '王同学',
          studentId: '2023002',
          className: '信管2301班',
          type: '病假',
          reason: '感冒发烧',
          startDate: '2025-05-20',
          endDate: '2025-05-22',
          status: '已批准',
          approver: '张主任',
          approveTime: '2025-05-19 10:15'
        },
        {
          id: 3,
          studentName: '赵同学',
          studentId: '2023003',
          className: '信管2301班',
          type: '事假',
          reason: '参加比赛',
          startDate: '2025-06-15',
          endDate: '2025-06-17',
          status: '待审批',
          submitTime: '2025-06-13 09:30'
        }
      ]
    },
  
    // 课程表相关模拟数据
    course: {
      // 课程列表
      list: [
        {
          id: 1,
          name: '信息系统开发',
          teacher: '张主任',
          classroom: '综合楼A-101',
          weekday: 1,
          startTime: '08:00',
          endTime: '09:40',
          weeks: '1-16'
        },
        {
          id: 2,
          name: '数据库管理',
          teacher: '李教授',
          classroom: '综合楼B-203',
          weekday: 2,
          startTime: '10:00',
          endTime: '11:40',
          weeks: '1-16'
        },
        {
          id: 3,
          name: '计算机网络',
          teacher: '王教授',
          classroom: '综合楼C-305',
          weekday: 3,
          startTime: '14:00',
          endTime: '15:40',
          weeks: '1-16'
        },
        {
          id: 4,
          name: '数据结构',
          teacher: '赵教授',
          classroom: '综合楼A-201',
          weekday: 4,
          startTime: '08:00',
          endTime: '09:40',
          weeks: '1-16'
        },
        {
          id: 5,
          name: '操作系统',
          teacher: '钱教授',
          classroom: '综合楼B-305',
          weekday: 5,
          startTime: '14:00',
          endTime: '15:40',
          weeks: '1-16'
        }
      ],
      // 课程表
      timetable: {
        1: [
          {
            id: 1,
            name: '信息系统开发',
            teacher: '张主任',
            classroom: '综合楼A-101',
            startTime: '08:00',
            endTime: '09:40'
          }
        ],
        2: [
          {
            id: 2,
            name: '数据库管理',
            teacher: '李教授',
            classroom: '综合楼B-203',
            startTime: '10:00',
            endTime: '11:40'
          }
        ],
        3: [
          {
            id: 3,
            name: '计算机网络',
            teacher: '王教授',
            classroom: '综合楼C-305',
            startTime: '14:00',
            endTime: '15:40'
          }
        ],
        4: [
          {
            id: 4,
            name: '数据结构',
            teacher: '赵教授',
            classroom: '综合楼A-201',
            startTime: '08:00',
            endTime: '09:40'
          }
        ],
        5: [
          {
            id: 5,
            name: '操作系统',
            teacher: '钱教授',
            classroom: '综合楼B-305',
            startTime: '14:00',
            endTime: '15:40'
          }
        ]
      }
    },
  
    // 成绩相关模拟数据
    chengji: {
      list: [
        {
          id: 1,
          courseName: '信息系统开发',
          score: 92,
          credit: 4,
          semester: '2025春季学期'
        },
        {
          id: 2,
          courseName: '数据库管理',
          score: 88,
          credit: 3,
          semester: '2025春季学期'
        },
        {
          id: 3,
          courseName: '计算机网络',
          score: 85,
          credit: 3,
          semester: '2025春季学期'
        },
        {
          id: 4,
          courseName: '数据结构',
          score: 90,
          credit: 4,
          semester: '2024秋季学期'
        },
        {
          id: 5,
          courseName: '操作系统',
          score: 87,
          credit: 4,
          semester: '2024秋季学期'
        }
      ],
    // 教师录入的成绩
    teacherInput: [
        {
          courseId: 1,
          courseName: '信息系统开发',
          className: '信管2301班',
          semester: '2025春季学期',
          students: [
            {
              id: 1,
              studentId: '2023001',
              studentName: '李同学',
              score: 92,
              status: '已录入'
            },
            {
              id: 2,
              studentId: '2023002',
              studentName: '王同学',
              score: 85,
              status: '已录入'
            },
            {
              id: 3,
              studentId: '2023003',
              studentName: '赵同学',
              score: 88,
              status: '已录入'
            }
          ]
        },
        {
          courseId: 2,
          courseName: '数据库管理',
          className: '信管2301班',
          semester: '2025春季学期',
          students: [
            {
              id: 1,
              studentId: '2023001',
              studentName: '李同学',
              score: 88,
              status: '已录入'
            },
            {
              id: 2,
              studentId: '2023002',
              studentName: '王同学',
              score: 90,
              status: '已录入'
            },
            {
              id: 3,
              studentId: '2023003',
              studentName: '赵同学',
              score: 82,
              status: '已录入'
            }
          ]
        }
      ],
      // 成绩统计
      stats: {
        averageScore: 88.5,
        highestScore: 92,
        lowestScore: 82,
        passRate: '100%',
        excellentRate: '33.3%'
      }
    },
    
    // 考勤管理相关模拟数据
    kaoqin: {
      // 管理员查看的考勤记录
      adminList: [
        {
          id: 1,
          studentName: '李同学',
          studentId: '2023001',
          className: '信管2301班',
          date: '2025-06-01',
          checkinTime: '08:30',
          checkoutTime: '17:30',
          status: '正常'
        },
        {
          id: 2,
          studentName: '王同学',
          studentId: '2023002',
          className: '信管2301班',
          date: '2025-06-01',
          checkinTime: '09:05',
          checkoutTime: '17:30',
          status: '迟到'
        },
        {
          id: 3,
          studentName: '赵同学',
          studentId: '2023003',
          className: '信管2301班',
          date: '2025-06-01',
          checkinTime: '08:45',
          checkoutTime: '16:30',
          status: '早退'
        }
      ],
      // 考勤统计
      adminStats: {
        total: 120,
        normal: 100,
        late: 10,
        early: 5,
        absent: 5
      }
    },
    
    // 请假管理相关模拟数据
    qingjia: {
      // 管理员查看的请假记录
      adminList: [
        {
          id: 1,
          studentName: '李同学',
          studentId: '2023001',
          className: '信管2301班',
          type: '事假',
          reason: '参加培训',
          startDate: '2025-06-10',
          endDate: '2025-06-12',
          status: '已批准',
          approver: '张主任',
          approveTime: '2025-06-08 14:30'
        },
        {
          id: 2,
          studentName: '王同学',
          studentId: '2023002',
          className: '信管2301班',
          type: '病假',
          reason: '感冒发烧',
          startDate: '2025-05-20',
          endDate: '2025-05-22',
          status: '已批准',
          approver: '张主任',
          approveTime: '2025-05-19 10:15'
        },
        {
          id: 3,
          studentName: '赵同学',
          studentId: '2023003',
          studentId: '2023003',
          className: '信管2301班',
          type: '事假',
          reason: '参加比赛',
          startDate: '2025-06-15',
          endDate: '2025-06-17',
          status: '待审批',
          submitTime: '2025-06-13 09:30'
        }
      ],
      // 请假统计
      adminStats: {
        total: 10,
        approved: 5,
        pending: 3,
        rejected: 2
      }
    },
    
    // 课程管理相关模拟数据
    kecheng: {
      // 管理员查看的课程列表
      adminList: [
        {
          id: 1,
          name: '信息系统开发',
          teacher: '张主任',
          department: '信息化管理中心',
          credit: 4,
          semester: '2025春季学期',
          studentCount: 35,
          status: '进行中'
        },
        {
          id: 2,
          name: '数据库管理',
          teacher: '李教授',
          department: '信息化管理中心',
          credit: 3,
          semester: '2025春季学期',
          studentCount: 40,
          status: '进行中'
        },
        {
          id: 3,
          name: '计算机网络',
          teacher: '王教授',
          department: '信息化管理中心',
          credit: 3,
          semester: '2025春季学期',
          studentCount: 38,
          status: '进行中'
        }
      ]
    },
    
    // 用户管理相关模拟数据
    yonghu: {
      // 管理员查看的用户列表
      adminList: [
        {
          id: 1,
          account: 'admin',
          name: '系统管理员',
          role: 'admin',
          department: '信息化管理中心',
          phone: '13800138000',
          email: 'admin@example.com',
          status: '正常',
          createTime: '2024-01-01'
        },
        {
          id: 2,
          account: 'teacher1',
          name: '张主任',
          role: 'teacher',
          department: '信息化管理中心',
          phone: '13800138001',
          email: 'teacher1@example.com',
          status: '正常',
          createTime: '2024-01-02'
        },
        {
          id: 3,
          account: 'teacher2',
          name: '李教授',
          role: 'teacher',
          department: '信息化管理中心',
          phone: '13800138003',
          email: 'teacher2@example.com',
          status: '正常',
          createTime: '2024-01-03'
        },
        {
          id: 4,
          account: 'student1',
          name: '李同学',
          role: 'student',
          department: '信息化管理中心',
          className: '信管2301班',
          studentId: '2023001',
          phone: '13800138002',
          email: 'student1@example.com',
          status: '正常',
          createTime: '2024-01-04'
        },
        {
          id: 5,
          account: 'student2',
          name: '王同学',
          role: 'student',
          department: '信息化管理中心',
          className: '信管2301班',
          studentId: '2023002',
          phone: '13800138004',
          email: 'student2@example.com',
          status: '正常',
          createTime: '2024-01-05'
        }
      ]
    },
    
    // 管理员相关模拟数据
    admin: {
      // 系统统计数据
      stats: {
        totalUsers: 120,
        totalStudents: 100,
        totalTeachers: 18,
        pendingLeaves: 5,
        todayAttendances: 95
      }
    },
    
    // 消息相关模拟数据
    message: {
      // 消息列表
      list: [
        {
          id: 1,
          title: '系统通知',
          content: '关于2025年端午节放假安排的通知',
          sender: '系统管理员',
          sendTime: '2025-06-01 08:00',
          isRead: true
        },
        {
          id: 2,
          title: '考勤提醒',
          content: '您今日尚未签到，请及时处理',
          sender: '系统',
          sendTime: '2025-06-05 09:00',
          isRead: false
        },
        {
          id: 3,
          title: '请假审批结果',
          content: '您的请假申请已被批准',
          sender: '张主任',
          sendTime: '2025-06-08 14:30',
          isRead: false
        }
      ]
    },
    
    // 通知公告相关模拟数据
    notice: {
      // 通知列表
      list: [
        {
          id: 1,
          title: '关于2025年端午节放假安排的通知',
          content: '根据国家法定节假日安排，2025年端午节放假时间为6月20日至6月22日，共3天。6月23日（星期一）正常上班上课。',
          publisher: '系统管理员',
          publishTime: '2025-06-01 08:00',
          isImportant: true
        },
        {
          id: 2,
          title: '关于开展2025年度学生综合素质评价的通知',
          content: '各位同学，2025年度学生综合素质评价工作将于6月15日开始，请各位同学按时登录系统完成自评和互评工作。',
          publisher: '教务处',
          publishTime: '2025-06-05 10:30',
          isImportant: false
        },
        {
          id: 3,
          title: '关于举办校园文化节的通知',
          content: '为丰富校园文化生活，我校将于6月25日至6月30日举办校园文化节，欢迎各位师生积极参与。',
          publisher: '学生处',
          publishTime: '2025-06-10 14:00',
          isImportant: false
        }
      ]
    },
    
    // 登录相关模拟数据
    login: {
      // 登录成功返回数据
      success: {
        token: 'mock_token_123456789',
        user: {
            id: 1,
            account: 'admin',
            name: '系统管理员',
            role: 'admin',
            department: '信息化管理中心',
            phone: '13800138000',
            email: 'admin@example.com',
            avatar: '/images/default_avatar.png',
            status: '正常'
          }
        },
        // 登录失败返回数据
        fail: {
          message: '账号或密码错误'
        }
      },
      
      // 学生相关模拟数据
      student: {
        // 学生个人信息
        profile: {
          id: 3,
          account: 'student1',
          name: '李同学',
          role: 'student',
          department: '信息化管理中心',
          className: '信管2301班',
          studentId: '2023001',
          phone: '13800138002',
          email: 'student@example.com',
          avatar: '/images/default_avatar.png',
          status: '正常',
          gender: '男',
          birthday: '2005-01-15',
          address: '广州市天河区',
          emergencyContact: '李父',
          emergencyPhone: '13900139000'
        },
        // 学生课程表
        timetable: {
          1: [
            {
              id: 1,
              name: '信息系统开发',
              teacher: '张主任',
              classroom: '综合楼A-101',
              startTime: '08:00',
              endTime: '09:40'
            }
          ],
          2: [
            {
              id: 2,
              name: '数据库管理',
              teacher: '李教授',
              classroom: '综合楼B-203',
              startTime: '10:00',
              endTime: '11:40'
            }
          ],
          3: [
            {
              id: 3,
              name: '计算机网络',
              teacher: '王教授',
              classroom: '综合楼C-305',
              startTime: '14:00',
              endTime: '15:40'
            }
          ],
          4: [
            {
              id: 4,
              name: '数据结构',
              teacher: '赵教授',
              classroom: '综合楼A-201',
              startTime: '08:00',
              endTime: '09:40'
            }
          ],
          5: [
            {
              id: 5,
              name: '操作系统',
              teacher: '钱教授',
              classroom: '综合楼B-305',
              startTime: '14:00',
              endTime: '15:40'
            }
          ]
        }
      },
      
      // 教师相关模拟数据
      teacher: {
        // 教师个人信息
        profile: {
          id: 2,
          account: 'teacher1',
          name: '张教授',
          role: 'teacher',
          department: '信息化管理中心',
          phone: '13800138001',
          email: 'teacher@example.com',
          avatar: '/images/default_avatar.png',
          status: '正常',
          gender: '男',
          birthday: '1980-05-20',
          address: '广州市天河区',
          title: '副教授',
          specialty: '信息系统与管理'
        },
        // 教师课程
        courses: [
          {
            id: 1,
            name: '信息系统开发',
            classroom: '综合楼A-101',
            weekday: 1,
            startTime: '08:00',
            endTime: '09:40',
            weeks: '1-16',
            studentCount: 35
          },
          {
            id: 6,
            name: '软件工程',
            classroom: '综合楼A-102',
            weekday: 3,
            startTime: '10:00',
            endTime: '11:40',
            weeks: '1-16',
            studentCount: 32
          }
        ],
        // 教师考勤管理
        attendances: [
          {
            courseId: 1,
            courseName: '信息系统开发',
            className: '信管2301班',
            date: '2025-06-01',
            students: [
              {
                id: 1,
                studentId: '2023001',
                studentName: '李同学',
                status: '出勤',
                remark: ''
              },
              {
                id: 2,
                studentId: '2023002',
                studentName: '王同学',
                status: '迟到',
                remark: '迟到10分钟'
              },
              {
                id: 3,
                studentId: '2023003',
                studentName: '赵同学',
                status: '请假',
                remark: '病假'
              }
            ]
          }
        ]
      },
      
      // 首页相关模拟数据
      home: {
        // 通知公告
        notices: [
          {
            id: 1,
            title: '关于2025年端午节放假安排的通知',
            publishTime: '2025-06-01 08:00',
            isImportant: true
          },
          {
            id: 2,
            title: '关于开展2025年度学生综合素质评价的通知',
            publishTime: '2025-06-05 10:30',
            isImportant: false
          }
        ],
        // 今日课程
        todayCourses: [
          {
            id: 1,
            name: '信息系统开发',
            teacher: '张主任',
            classroom: '综合楼A-101',
            startTime: '08:00',
            endTime: '09:40'
          },
          {
            id: 2,
            name: '数据库管理',
            teacher: '李教授',
            classroom: '综合楼B-203',
            startTime: '10:00',
            endTime: '11:40'
          }
        ],
        // 待办事项
        todos: [
          {
            id: 1,
            title: '提交信息系统开发课程作业',
            deadline: '2025-06-10 23:59',
            isImportant: true
          },
          {
            id: 2,
            title: '完成综合素质评价',
            deadline: '2025-06-20 23:59',
            isImportant: false
          }
        ]
      }
  };
  
  // 获取模拟数据的辅助函数
  function getMockData(key) {
    const keys = key.split('.');
    let data = MockData;
    for (const k of keys) {
      if (data && data[k]) {
        data = data[k];
      } else {
        return null;
      }
    }
    return data;
  }
  
  module.exports = {
    MockData,
    getMockData
  };